home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 16 / fpc225_3.zip / F-PCHELP.ZIP / DEFERS.HLP < prev    next >
Text File  |  1988-06-20  |  2KB  |  40 lines

  1. \ DEFERS.HLP    help definitions for DEFERS type words  Tom Zimmer
  2.  
  3. DEFERS          ( <name> --- )
  4.         installs the contents of a defered word in the current definition
  5.         being defined. This is used to build a chain of words to be
  6.         performed.
  7.  
  8.         Here is an example of how to build a DEFERS chain:
  9.  
  10.         DEFER FUNC      ' NOOP IS FUNC
  11.  
  12.         : FUNCTION1     ( --- )
  13.                         DEFERS FUNC
  14.                         ... THE DEFINITION ... ;        ' FUNCTION1 IS FUNC
  15.  
  16.         : FUNCTION2     ( --- )
  17.                         DEFERS FUNC
  18.                         ... THE DEFINITION ... ;        ' FUNCTION2 IS FUNC
  19.  
  20.         Now if you were to use SEE on FUNCTION1 is would look like this:
  21.  
  22.         : FUNCTION1     NOOP ... THE DEFINITION ... ;
  23.  
  24.         And also on FUNCTION2:
  25.  
  26.         : FUNCTION2     FUNCTION1 ... THE DEFINITION ... ;
  27.  
  28.         As you can see whatever was currently in FUNC got compiled into
  29.         the new definition being created.  The result of the above technique
  30.         is that each new function added to the chain, is performed after
  31.         all of the previous functions have been performed.  Truely a chain.
  32.  
  33. UNDEFER         <name> ( -- )
  34.         This is sort of an undo for DEFERS.  UNDEFER removes one level from
  35.         the chain of a defered word.  Must be used with EXTREME caution,
  36.         as there is no protection from trying to use it at the wrong time
  37.         in the wrong place.  YOU ARE ON YOUR OWN with this one.  See also
  38.         DEFERS above.
  39.  
  40.